package com.toymate.common.enums;

import lombok.Getter;

/**
 * ErrorEnum
 *
 * @author weirdor (179946422@qq.com)
 * @version v1.0.0
 */
@Getter
public enum ErrorEnum {

    SUCCESS(200, "成功"),
    ERROR(5000, "失败"),
    PARAMS_VALID_ERROR(310, "参数校验错误"),
    PARAMS_TYPE_ERROR(311, "参数类型错误"),
    REQUEST_METHOD_ERROR(312, "请求方法错误"),
    ASSERT_ARGUMENT_ERROR(313, "断言参数错误"),
    NO_PERMISSION(403, "无相关权限"),
    REQUEST_404_ERROR(404, "请求接口不存在"),
    SYSTEM_ERROR(500, "系统错误");

    private final int code;
    private final String message;

    ErrorEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

}
